USE [RD_InventoryMart]
GO

/****** Object:  Index [PK_Inventory_Star_Facts]    Script Date: 05/05/2010 13:41:33 ******/
ALTER TABLE [dbo].[Inventory_Star_Facts] ADD  CONSTRAINT [PK_Inventory_Star_Facts] PRIMARY KEY CLUSTERED 
(
	[BusinessUnitCode] ASC,
	[ItemNumber] ASC,
	[Location] ASC,
	[LotNumber] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO


USE [RD_InventoryMart]
GO

/****** Object:  Index [IX_BUiD]    Script Date: 05/05/2010 13:41:27 ******/
CREATE NONCLUSTERED INDEX [IX_BUiD] ON [dbo].[Inventory_Star_Facts] 
(
	[BusinessUnitID] ASC,
	[CompanyNumberID] ASC,
	[ItemNumberID] ASC,
	[ItemBranchID] ASC,
	[LocationID] ASC,
	[LotID] ASC,
	[CostID] ASC,
	[PriceID] ASC,
	[SourceID] ASC,
	[ItemNumber] ASC,
	[BusinessUnitCode] ASC,
	[Location] ASC,
	[LotNumber] ASC,
	[QuantityOnHand] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_BusinessUnitID]    Script Date: 05/05/2010 13:41:27 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_BusinessUnitID] ON [dbo].[Inventory_Star_Facts] 
(
	[BusinessUnitID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_CompanyID]    Script Date: 05/05/2010 13:41:27 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_CompanyID] ON [dbo].[Inventory_Star_Facts] 
(
	[CompanyNumberID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_CostID]    Script Date: 05/05/2010 13:41:27 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_CostID] ON [dbo].[Inventory_Star_Facts] 
(
	[CostID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_DateUpdated]    Script Date: 05/05/2010 13:41:27 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_DateUpdated] ON [dbo].[Inventory_Star_Facts] 
(
	[DateUpdatedID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ItemBranchID]    Script Date: 05/05/2010 13:41:27 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ItemBranchID] ON [dbo].[Inventory_Star_Facts] 
(
	[ItemBranchID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ItemNumberID]    Script Date: 05/05/2010 13:41:27 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ItemNumberID] ON [dbo].[Inventory_Star_Facts] 
(
	[ItemNumberID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_LastReceiptDate]    Script Date: 05/05/2010 13:41:27 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_LastReceiptDate] ON [dbo].[Inventory_Star_Facts] 
(
	[LastReceiptDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_LocationID]    Script Date: 05/05/2010 13:41:27 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_LocationID] ON [dbo].[Inventory_Star_Facts] 
(
	[LocationID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_LotID]    Script Date: 05/05/2010 13:41:27 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_LotID] ON [dbo].[Inventory_Star_Facts] 
(
	[LotID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_NextCountDate]    Script Date: 05/05/2010 13:41:27 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_NextCountDate] ON [dbo].[Inventory_Star_Facts] 
(
	[NextCountDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_PriceID]    Script Date: 05/05/2010 13:41:27 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_PriceID] ON [dbo].[Inventory_Star_Facts] 
(
	[PriceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [missing_index_103]    Script Date: 05/05/2010 13:41:27 ******/
CREATE NONCLUSTERED INDEX [missing_index_103] ON [dbo].[Inventory_Star_Facts] 
(
	[PrimaryLocation] ASC
)
INCLUDE ( [LocationID],
[LotID],
[QuantityOnHand],
[QuantityOnHardCommit],
[QuantityOnSoftCommit]) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO


